# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: T.J. Townsend <blakkheim@archlinux.org>
# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: sh0 <mee@sh0.org>
# Contributor: Maxwel <msg.maxwel@gmail.com>

pkgname=pax-utils
pkgver=1.3.7
pkgrel=1
pkgdesc='ELF utils that can check files for security relevant properties'
url='https://wiki.gentoo.org/wiki/Hardened/PaX_Utilities'
arch=('loong64' 'x86_64')
license=('GPL2')
depends=('bash' 'libcap' 'libcap.so' 'libseccomp' 'python' 'python-pyelftools')
makedepends=('docbook-xml' 'docbook-xsl' 'git' 'linux-headers' 'meson' 'xmlto')
source=(git+https://anongit.gentoo.org/git/proj/pax-utils.git?signed#tag=v$pkgver)
sha512sums=('SKIP')
validpgpkeys=('5EF3A41171BB77E6110ED2D01F3D03348DB1A3E2')

prepare() {
  cd $pkgname
  sed -E 's|(  paths =) \[\]|\1 ["/usr/lib"]|g' -i lddtree.py
}

build() {
  arch-meson $pkgname build \
    -Duse_seccomp=true
  meson compile -C build
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim: ts=2 sw=2 et:
